package service.impl;

import java.util.Date;

import org.junit.Test;

import entity.Students;
import entity.Users;
import junit.framework.Assert;
import service.StudentsDAO;
import service.UsersDAO;

public class TestUsersDAOImpl {
	
	@Test
	public void testUsersLogin(){
		Users u = new Users(1, "zhangsan", "123");
		UsersDAO udao = new UsersDAOImpl();
		Assert.assertEquals(true, udao.usersLogin(u));
	}
	
	@Test
	public void testGetNewSid(){
		StudentsDAOImpl sdao = new StudentsDAOImpl();
	}
	
	@Test
	public void testAddStudent(){
		Students student = new Students();
		student.setSname("张三丰");
		student.setGender("男");
		student.setBirthday(new Date());
		student.setAddress("武当山");
		
		StudentsDAO sdao = new StudentsDAOImpl();
		Assert.assertEquals(true, sdao.addStudents(student));
	}
}
